<?php
/**
 * Created by PhpStorm.
 * User: fengzi
 * Date: 2019/6/3
 * Time: 14:29
 */

namespace app\vehicle\model;
use think\Model;

class Forum extends Model
{
    public function getThumbAttr($value){
        return $value?config('database.img_url').$value:'';
    }
    public function getCreateTimeAttr($value){
        return date('Y-m-d',$value);
    }
    public function getUseTimeAttr($value){
        return date('Y-m-d H:i',$value);
    }
    public function getContentAttr($value){
        // $value = htmlspecialchars_decode(str_replace('/ueditor/php/upload/image',config('database.img_url').'/ueditor/php/upload/image',$value));
        return str_replace('/ueditor/php/upload/image',config('database.img_url').'/ueditor/php/upload/image',$value);
    }

}